package deng.jbe.ejb;

import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.ejb.ActivationConfigProperty;

import org.apache.log4j.Logger;

@MessageDriven(activationConfig={
		@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
		@ActivationConfigProperty(propertyName="destination", propertyValue="/queue/ExampleQueue")
})
public class MyMessageBean implements MessageListener {

	private static Logger logger = Logger.getLogger(MyMessageBean.class);
	
	@Override
	public void onMessage(Message message) {
		logger.info("Message bean is running. Instance: " + this + ", message " + message);
	}

}
